Pro_Pack : MetaData

ProPack metadata module contains all the specifically build nodes for the extended pipelines running under ProPack. These include our Red9Puppet and the exporter and audio managementsystems

>>> # import statement for the module via the r9pro decompiler
>>> from Red9.pro_pack import r9pro
>>> r9pro.r9import('r9pmeta')
>>> import r9pmeta

This module is extensions to the main metaData support through the Red9 StudioPack and requires the StudioPack codebase to run

Main Classes

Pro_MetaRig_Base(*args, **kws) Red9 bespoke Base Class for Rig system MetaRig core.
Pro_MetaRig(*args, **kws) Red9 bespoke Puppet Rig system MetaRig core ;) This is the Red9 Puppets master base class into all the systems.
Pro_MetaRig_SRC(*args, **kws) Class node used by the publisher systems.
Pro_MetaRig_Prop(*args, **kws) Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.
Pro_MetaRig_FacialUI(*args, **kws) SubClass of the MetaRig, designed to manage facial board style controls for a facial system.
SRC_RiggingUI() SRC extension rigging UI, allowing you to add a new SRC_Extension MNode and wire controllers to it.
ExportTag_Base(*args, **kws) Generic Export base class inheriting from MetaClass.
ExportTag_Character(*args, **kws) Export subclass for characters
ExportTag_Facial(*args, **kws) Export subclass for Facial UI systems
ExportTag_Prop(*args, **kws) Export subclass for props
ExportTag_Environment(*args, **kws) Export subclass for environments
ExportLoopNode(*args, **kws) Export Timerange node, intended to hook to a valid ExportTag
SceneMover(*args, **kws) Scene Shift Handler : to move an entire Maya scene in world space
AudioGroup(*args, **kws) a simple node designed to group / link audio sound nodes to together so they can
wireControlsToNewMetaRig(nodes, name=None, mRig=None)

fast way to wire nodes to a blank MetaRig to gain some of the support features of the codebase without having to manually build a structured network

Parameters:
  • nodes – nodes to wire as controllers to the MetaRig
  • name – name of the MetaRig node generated if no mRig was passed in.
  • mRig – optional MetaRig instance to add the controls too, if blank then we generate a new instance and return that
get_Red9ProductionRig()

wrapper to specifically return instances of the ProMeta body Rig for clients running our rigging systems

get_Red9ProductionFacialUI()

wrapper to specifically return instances of the ProMeta facial GUI, be that our internal production board, or an external board connected to the node such as 3Laterals

<<<<<<< HEAD get_ExportTags(tagIDs=[], exactmatch=False)

wrapper to return all ExportTags in the scene with optional filtering by tagID

Parameters:
  • tagIDs – [] if given only return exportTags whos id matches
  • exactmatch – bool, if True we name the exact string passed in, else we do ‘if x in y’ : default=False
======= get_ExportTags()

wrapper to return all ExportTags in the scene

>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
<<<<<<< HEAD get_ExportLoops(loopnames=[], exactmatch=False)

wrapper to return all ExportLoopNodes in the scene with optional filtering by loopname

Parameters:
  • loopname – [] if given only return ExportLoops whos loopname matches
  • exactmatch – bool, if True we name the exact string passed in, else we do ‘if x in y’ : default=False
======= get_ExportLoops()

wrapper to return all ExportTags in the scene

>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
get_fileProductionType()

gets the status of the currently loaded file depending on the systems found

rType: ‘SRC_EXT’,’RIG’,’PUB’

class Inspector(mRig)

Bases: object

mNode inspector is designed to retrieve information on all the internal systems of a given mRig

class Pro_MetaRig_Base(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaRig

Red9 bespoke Base Class for Rig system MetaRig core. This is a general extension to the default MetaRig to include systems such as the export handling. This is aimed to be used for simple bespoke rigs and to provide a new base set of functions for the main rig and facial classes that inherit from it

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

isBound

check to see if this rig is on a live binder

visibility_renderMeshes(state=True, query=False)

if self.renderMeshes is connected then switch the visibility state of the linked geo

Parameters:
  • state – switch state
  • query – query the current state of the renderMeshes visibility
visibility_grpmain(state=True, query=False)

if self.GRP_Main is set then switch the visibility state of the linked GRP_Main Grp node

Parameters:
  • state – switch state
  • query – query the current state of the grpmain visibility
get_rootJnt()

generic wrapper for some of the healthTests. This should be a reliable and consistent way to get the skeletonRoot jnt back from any rig system. This is here to handle simple mSRC style rigs that purely have an exportTag to ID the root jnt.

addExportTag(tagID=None, exportClass=None, exportRoot=None)

add an export tag of type to the rig

Parameters:
  • tag – ID of the tag as a string
  • exportClass – class of exportTag to link up, this can be a string or the actual class
  • exportRoot – the root joint for the export

TODO : run a getExportTags first to make sure we validate 1 ExpTag of type per rig BUT an mRig should be able to have 1 character and 1 facial tag at the same time

getExportTags(exportClass=None, singular=False)

Find all bound exportTags in the system

Parameters:
  • exportClass – if given only search for exportClass of type else return all connected exportTags
  • singular – if True we clamp this to the exportTag wire from self rather than any network searching
load_pickerTemplate(filepath)

load and bind a given characterPicker template file to the rig

Parameters:filepath – cpicker template file to load to the rig
loadAnimation_postload_call(feedback, *args, **kws)

Overloaded call that gets run after the mRig.loadAnimation func so we can deal and expand with additional functionality without padding out the main AnimMap filehandlers

Parameters:feedback – the feedback data from the loadAnimations call
copyAnimation(mRig, incRoots=True)

Copy the animation data from self onto the given destination mRig

Parameters:
  • mRig – destination mRig to copy the animation data over too
  • incRoots – usual flag to include the CTRL_Main controller in the copy
copyPose(mRig, incRoots=True)

Copy the pose data from self onto the given destination mRig

Parameters:
  • mRig – destination mRig to copy the animation data over too
  • incRoots – usual flag to include the CTRL_Main controller in the copy
<<<<<<< HEAD copyExportLoops(mRig, loops=[], loopnames=[])
======= copyExportLoops(mRig, loops=[]) >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e

copy all exportLoop nodes from self to given mRig system

Parameters:
  • mRig – destination mRig to copy the animation data over too
  • loops – optional specific loops to copy, else we copy all loops found
  • <<<<<<< HEAD
  • loopnames – if not loops then this becomes a filter to find loops with specific names
  • ======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
castAudioGrp(mRig)

connect any instance of an AudioGrp node from this mRig over to the given

Parameters:mRig – destination mRig to copy the animation data over too
copyData_to_rig(mRig, animation=True, exportData=True, audioGrp=True, refEdits=True)

cast all animation data on this mRig over to the given mRig

Parameters:
  • mRig – the rig to take the animation data over too
  • animation – copy the animation data from self to the given mRig
  • exportData – copy the exportData data from self to the given mRig
  • audioGrp – copy the audioGrp data from self to the given mRig
  • refEdits – copy the refEdits data from self to the given mRig, not yet implemented!

TODO: cast referenced edits to this source rig

gatherInfo(level=3, keys=[])

collect key info on this rig system, used to pass data into the r9Anim and r9Pose files as cross-reference

Parameters:
  • level – 0,1,2,3 : the detail into which we gather data in the report 0 = just gather data on self 1 = gather data on self and connected subsystems 2 = more granular detail on all systems, exporter goes into timeranges at this level 3 = run everything and gather as much as we can at the mNode level network 4 = including going down to the renderMeshes and inspecting those for shaders, textures, blends etc
  • keys – only return specific keys within the gathered data
info_exportData()

return a dict of all info on the exporter networks including the loops / export paths & roots

info_texturePaths()

return all textures bound to this mRig’s renderMeshes

info_shaders()

return all currently connected shadingEngines from the connected renderMeshes

info_jointCount()

return the current joint count of the bound Skeleton hierarchy the root of this is found firstly via the exportTags, if these aren’t setup then the skeletonRoot is found from the exportSkeletonRoot wire to the mRig

info_blendShapes()

return all blendshapes bound to the connected renderMeshes history

info_blendCount()

return the current blendshape count of any blendshapes in the connected renderMeshes history

info_audioGrp()

return all audioGRP info connected to this rig system including connected audioNodes

info_timecode(timerange=())

return all timecode data for this rig

Parameters:timerange – we need to process the Timecode against a start and end time to get the range of the anim data, if none is passed in then we grab the timeline ranges
class Pro_MetaRig(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_Base

Red9 bespoke Puppet Rig system MetaRig core ;) This is the Red9 Puppets master base class into all the systems.

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

<<<<<<< HEAD
Skeleton

INTERNAL RED9 : binding of the skeleton class used by the build code

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
gatherInfo(level=3, keys=[], *args, **kws)

collect key info on this Red9 Puppet rig system, used to pass data into the r9Anim and r9Pose files as cross-reference

Parameters:
  • level – 0,1,2,3 : the detail into which we gather data in the report 0 = just gather data on self 1 = gather data on self and connected subsystems 2 = more granular detail on all systems, exporter goes into timeranges at this level 3 = run everything and gather as much as we can at the mNode level network 4 = including going down to the renderMeshes and inspecting those for shaders,textures, blends etc
  • keys – only return specific keys within the gathered data
connectFacialUI(facialcore=None)

connect an instance of the FacialCore to the mRig

get_patches()

return the patch data and print details

isBound

check to see if this rig is on a live binder

visibility_renderMeshes_head(state=True, query=False)

switch off the display of all body_Rig head geo based on the renderMesh_head attr and if we have a facial rig wired, turn ON it’s renderMesh geo

Parameters:
  • state – switch the state of the renderMeshs
  • query – query the current state
visibility_facial(state=True, query=False)

if the FacialCore attr is wired to a facial rig then this will toggle the rigs renderMeshes_Head and the FacialCore’s renderMeshes, effectively switching off the body’s head geo and turning on the facialCores head.

Parameters:
  • state – switch state, True favours the FacialCore’s geo to be visible
  • query – query the current state of the facial visibility
switch_to_fk(mSystems=[])
<<<<<<< HEAD

switch the entire rig to FK, this throws the ik_fk_blender attrs value to 1 for all systems

=======

switch the entire rig to FK

>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
Parameters:mSystems – systems to switch mode for
switch_to_ik(mSystems=[])
<<<<<<< HEAD

switch the entire rig to IK, this throws the ik_fk_blender attrs value to 0 for all systems

=======

switch the entire rig to IK

>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
Parameters:mSystems – systems to switch mode for
<<<<<<< HEAD
fk_ik_toggle(system)

simple toggle call to switch the current state of the system between fk and ik This checks the switch attr and if 0 switches over to FK, if it’s 1 then we switch to IK Used in the new DagProcMenu systems

fk_ik_match(nodes=[], mSystems=[], time=False, switch=False, keyswitch=True)
=======
fk_ik_match(nodes=[], time=False, switch=False, keyswitch=True)
>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e

Set the system to FK MODE : match the fk system to that of the ik

Parameters:
    <<<<<<< HEAD
  • nodes – [] hint nodes wired to the systems you want to match, used to find id subSystems
  • mSystems – [] list of mSystem nodes to switch, if given we don’t process the nodes args
  • =======
  • node – hint nodes wired to the systems you want to match
  • >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
  • time – whether to run the match over time or not
  • switch – also switch the ik_fk_blender attr to leave the system in FK mode
  • keyswitch – if switch is true, this also adds in keys to control the switch mode
<<<<<<< HEAD ik_fk_match(nodes=[], mSystems=[], time=False, switch=False, keyswitch=True)
======= ik_fk_match(nodes=[], time=False, switch=False, keyswitch=True) >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e

Set the system to IK MODE : match the ik to the fk system

Parameters:
    <<<<<<< HEAD
  • nodes – [] hint nodes wired to the systems you want to match, used to find id subSystems
  • mSystems – [] list of mSystem nodes to switch, if given we don’t process the nodes args
  • =======
  • nodes – hint nodes wired to the systems you want to match
  • >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
  • time – whether to run the match over time or not
  • switch – also switch the ik_fk_blender attr to leave the system in IK mode
  • keyswitch – if switch is true, this also adds in keys to control the switch mode
class Pro_MetaRig_SRC(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_Base

Class node used by the publisher systems. With the SRC_RiggingUI you can add into an SRC file an Pro_MetaRig_SRC node which is designed as a basic, client facing extension to the Red9Puppet.

The SRC file in our definition is the file with the base character, skeleton and skinning plus client specific controllers in it. By wiring these to the SRC node our Red9 Publishing systems sees the data and merges it into the main MetaRig on build. This means that client can add in their own subsystems, manage new controllers and be certain that this data is then merged into the main rig for all the rest of the pipelines.

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

isValid()

modify the behaviour as we don’t want to be stripping SRC EXT nodes that easily

class Pro_MetaRig_Prop(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_Base

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class Pro_MetaRig_FacialUI(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_Base

SubClass of the MetaRig, designed to manage facial board style controls for a facial system. Just an extract class to inherit from but it means that all our facial logic will find custom class control boards based on being subclassed from this consistent base.

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

delete()
reset()

simple wrap to load the zeroPose if found

add_cam_facemesh()

add and attached to the mNode a new camera constrained to the faceMesh of the system

TODO: make focal length 60 ish, we don’t want fisheye on the face cam

add_cam_UI()

add and attached to the mNode a new camera constrained to the facialGui of the system, identified as self.ctrl_main

get_cam_facemesh()

Get the camera targeted to the HeadMesh

get_cam_UI()

Get the camera targeted to the Facial Control Board

get_ctrls_brows(select=False)

Get child controls wired via ‘brow’ connection attrs Designed to be overloaded for your own facial systems

Parameters:select – select the controllers found
get_ctrls_lips(select=False)

Get child controls wired via ‘lip‘,’funnel‘,’pucker‘ connection attrs, Designed to be overloaded for your own facial systems

Parameters:select – select the controllers found
get_ctrls_eyes(select=False)

Get child controls wired via ‘eye’ connection attrs, Designed to be overloaded for your own facial systems

Parameters:select – select the controllers found
class SRC_RiggingUI

Bases: object

SRC extension rigging UI, allowing you to add a new SRC_Extension MNode and wire controllers to it. These will get merged into the main rig when we Publish

This runs the main SRC_Extension subclass from pro_meta which manages the connections

classmethod show()
filetype
src_node
exp_tag
mrig
validateSRCFile()

ensure we’re working on the SRC file not the RIG or PUB

add_src_extnode(*args)
add_ctrl(*args)

Run the STUB bindings for the connect to CTRL so that prefix is managed

remove_ctrl(*args)

Run the STUB bindings for the connect to CTRL so that prefix is managed

addExportTag(*args)

add the default export Tag for characters

validateRIGFile()

ensure we’re working on the SRC file not the RIG or PUB

runRigHealth(*args)

run the RIG validation setup for Cloud

printRigHealth(*args)

print the results of the Health testing

mirrorUI(*args)

open up the Red9 MirrorUI setup

class ProMetaFacialUI(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_FacialUI

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class Red9_MetaRig(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class SRC_RigExtension(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.Pro_MetaRig_SRC

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

addExportNode(node, exportClass, tag)

add an ExportTag to a given node

Parameters:
  • node – node to bind the export tag to
  • exportClass – class of tag to generate and link
  • tag – name for the tag

TODO : add MetaRig handling and checking

deleteExportNode(node)
class ExportTag_Base(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaClass

Generic Export base class inheriting from MetaClass. This is designed as a tagging system for assets that are then time managed via the ExportLoopNodes attached. Design is such that a rig would have a single exportTag, denoting asset name, base paths, root export joint, any suffix or prefix handling and any number of other key aspects regarding how that rig/asset is handled within a clients pipelines.

Hanging from the ExportTag would be individual exportLoops that tell the export managers what timeranges to process, where the files should get stored, what they get called etc.

key internal vars to note:

  • self.resolvedpath : this will be built up in any logic from custom exporter handlers
  • self.subfolder : if data then we insert the entry as a sub-folder from the main exportRoot so ‘my/export/path’ = ‘my/export/path/subfolder
  • self.loop_prefix : if data then we prefix any loop-names when we resolve paths - so ‘my_walk.icaf’ loop = ‘prefix_my_walk.icaf’
  • self.loop_suffix : if data then we suffix any loop-names when we resolve paths - so ‘my_walk.icaf’ loop = ‘my_walk_suffix.icaf’
  • self.exportLoopBase_class = ExportLoopNode : class we generate for exportLoops, used so that this can be overloaded for client specific behaviour
  • self.audio_allowed : determines if AudioGrp management is allowed on this class of tag
validate()

Add Validation methods to run prior to processing this export tag

tagType()

simple code to return the tags type based on it’s class inheritance

Returns:‘CHARACTER’,’FACIAL’,’PROP’,’ENVIRONMENT’ or ‘BASE’
<<<<<<< HEAD
mrig()

return the parent mRig to this ExportTag

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
gatherInfo(level=0)

info block gather for the export systems

>>> data['mClass']=super(ExportTag_Base, self).gatherInfo(level=level)
>>> data['tagID']=self.tagID
>>> data['isActive']=self.isActive
>>> data['exportPath']=self.exportPath
>>> data['exportRoot_specific']=self.exportRoot_specific
>>> data['audioGrp']=self.audioGrp
>>> data['exportLoops']=[]
>>> for loop in self.exportLoops:
>>>     data['exportLoops'].append(loop.loopname)
>>> data['subfolder']=self.subfolder
>>> data['loop_prefix']=self.loop_prefix
>>> data['loop_suffix']=self.loop_suffix
getNodes()

base handling of getNodes to wrap the override handlers

addSelectionOverride(nodes, state=True)

A way of by-passing the getNode logic by adding specific marker attr to nodes under the hierarchy

Parameters:
  • nodes – nodes to add the override behaviour too
  • state – initial state of the override
getSelectionOverrides()

return a dic of nodes that are to be either force included, or excluded from any processed node list

setSelectionOverride(nodes, state)

change the state of the override marker on the given nodes

removeSelectionOverrides(nodes=None)

remove any override marker on the given nodes, if no nodes are passed we delete ALL overrides under the full hierarchy from the exportRoot

addTimeRange(times=(), loopname='')

add a new timerange node to the tag

Parameters:
  • times – (start,end) float values of times
  • loopname – loopID used for export file name
<<<<<<< HEAD
connectTimeRanges(loops)

connect / cast current timerange nodes to this expTag. Note that we verify that the class of each loop matches the expected internal exportLoopBase_class bound to this expTag class

Parameters:loops – instantiated ExportLoop nodes
======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
loopNameExists(loopname)

check if the loopName about to be used exists

Parameters:loopname – the name of the loop were searching for
<<<<<<< HEAD getTimeRanges(loopnames=[])

get connected exportLoop nodes

Parameters:loopnames – [] if given this acts as a filter to return only matching loop names on this expTag
getExporLoops(loopnames=[])

renamed func call for the getTimeRanges

======= getTimeRanges()

get connected exportLoop nodes

>>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
audioGrp_add()

add a child AudioGrp node to manage linked audio for this tag. We use this to manage who in the scene is talking what lines of dialog

audioGrp_connect(audioGrp)

connect a current instance of an audioGrp node to self

Parameters:audioGrp – audioGrp node we’re wanting to connect
attach_asset(asset_tag)

connect a current instance of an ExportTag node to self as attachment

Parameters:asset_tag – aset tag to attach
class ExportTag_Character(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.ExportTag_Base

Export subclass for characters

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class ExportTag_Facial(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.ExportTag_Base

Export subclass for Facial UI systems

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class ExportTag_Prop(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.ExportTag_Base

Export subclass for props

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

get_attachment_node()
class ExportTag_Environment(*args, **kws)

Bases: Red9.pro_pack.core.metadata_pro.ExportTag_Base

Export subclass for environments

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

class ExportLoopNode(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaClass

Export Timerange node, intended to hook to a valid ExportTag metaNode to define exact timeranges and paths etc

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

gatherInfo(level=0)

gather key info on this loop node and return a dic

>> # base data handling >>> data[‘mClass’]=super(ExportLoopNode, self).gatherInfo(level=level) >>> data[‘loopname’]=self.loopname >>> data[‘loopname_resolved’]=self.loopname_resolved >>> data[‘startFrame’]=self.startFrame >>> data[‘endFrame’]=self.endFrame >>> data[‘isActive’]=self.isActive >>> data[‘exportPath’]=self.exportPath >>> data[‘exportPath_resolved’] = self.getExportPath() # resolved export path from the loops logic call >>> data[‘exportRoot_resolved’] = self.getRootNode() >>> data[‘exportRoot_specific’]=self.exportRoot_specific >>> data[‘additive’]=self.additive >>> if self.hasAttr(‘skeletonAlias’): >>> data[‘skeletonAlias’] = self.skeletonAlias
consumeInfo(data)

From the data gathered reset all the vars to self from this data. Allows us to record the data and reconstruct it in a consistent manner

Parameters:data – data to consume in a form of a correctly formatted dict, generated by the gatherInfo call itself
<<<<<<< HEAD getRootNode(allowMulti=False)
======= getRootNode() >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e

from the loopNode return the exportRoot from the main Tag. This is a wrapper so that exporters can just get all the loopNodes and grab all data directly rather than lots of walking logic

loopname_resolved

return the loopname in a resolved manner, taking into account any prefix or suffix handling set on it’s parent exportTag class

<<<<<<< HEAD
setLoopName(name)

this is a wrapper to be used instead of setting self.loopname directly. The reason is that this first goes through the resolve function to see if we need to append/prepend the loopname with anything, ie, name == name_face. It also validates the string, removing invalid characters, and checks for duplicate names, managing copy_naming

Parameters:name – the name to set the loopname attr too
ProcessStatus

Class instance, we bind the Exporter class LoopProcessStatus to the loopNode so that when it’s passed into the exporters we can track it’s process status on this instance directly ;)

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
getExportFile()

get the full file name, this is built from running the getExportPath and catenating the loop_name to the end + the exportTags internal var self.export_file_ext

getExportPath()

base logic to grab / catenate the exportPath.

Note

this path is without the filename, just the dir and is designed to be over-loaded at a client level to support any bespoke project behaviour

path_r9anim

return the catenated export path for r9anim files

<<<<<<< HEAD
path_r9Anim_reset()

reset any specific r9Anim path thats been set by the property

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
path_fbx

return the catenated export path for r9anim files

<<<<<<< HEAD
path_fbx_reset()

reset any specific fbx path thats been set by the property

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
isAdditive

return true if the additive bool if set on the tag

This first checks the Loop node itself, if thats set Additive we return that, if not we then check the exportTag mNode and return it’s additive state. Logic is that the exportTag is the parent of the loop therefore would over-load the Loops non-additive state.

exportRoot_specific_set(jnts=[])

this is so that when setting the exportSpecific_root we can run validation on it first

<<<<<<< HEAD
Parameters:jnts – [] joints to set as specific root nodes for the exporters

Note

the joints go through the r9Core.nodes_in_hierarchy codebase so can be shortname pointers as these are converted back to full path in the getRootNode calls

======= Parameters:jnts – joints to set as specific root nodes for the exporters >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
skeletonAlias

return the skeletonAlias stamped against the exportTag

setSampleSpace()

set a wire to another transform that we’re going to use as the relative space for any export. This all depends on the export of course!

removeSampleSpace()
getTimeRanges()

get the timerange of the loop

setTimeRanges()

set the current playback timerange to this node

check_isActive()

yes we already have a bool on the node however, if the timeranges parent exportTag is set inActive then that should over-ride the local flag

timeOffset(offset, timerange=None, ripple=True)

Offset the timerange data

Parameters:
  • offset – offset the timerange data for this instance
  • timerange – unused at the moment
  • ripple – unused at the moment
copyLoop_to(expTag)

duplicate this exportLoop to a different exportTag system, used for casting data between mRigs

Parameters:expTag – destination exportTag that will take the duplicated ExportLoopNode
class SceneMover(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaClass

Scene Shift Handler : to move an entire Maya scene in world space under a managed node

>>> mover=SceneMover()
>>> mover.scene_shift()
>>> 
>>> # do your export stuff
>>> 
>>> mover.scene_restore()

SceneMover is a SINGLETON and there can only ever be a single instance of it, when initialized we autogenerate a locator which becomes the root transform for the shift

cacheTransforms()

cache any initial transforms from the shiftRoot if it already exists

sceneroot

wrapper to the sceneRoot maya node itself

create_root()

when we take the instance is there already an existing SshiftRoot in the scene? if there is then the chances are that was left on purpose so we set the delet flags off

groupAll()

group the nodes up under a single root node and manage then under meta

scene_shift(transforms={})

actual process, group the scene nodes under subgrps and parent to a single instance of a SceneShiftRoot node. Finally apply the given transforms if specified

Parameters:transforms – format: {‘translate’:(0,0,0), ‘rotate’:(0,0,0)} if given in these are the transforms used on the node after everything has been grouped up
scene_restore(reset=True, delete=False)

restore the scene as it was before the shift

Parameters:
  • reset – whether we restore the scene as it originally was, or leave it in it’s shifted state
  • delete – whether to fully delete the system nodes after restore
delete()

carefully deletion of the system

class AudioGroup(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaClass

a simple node designed to group / link audio sound nodes to together so they can be linked to a character rig for export logic handling

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

audioNodes

return the linked audio as instantiates r9Audio.AudioNodes objects

audioHandler

get the audioNodes linked as an r9Audio.AudioHandler object

gatherInfo(level=0)

gather key info on this AudioGrp node and return a dic of all connected audio node data

connectAudioNodes(audio=[], paths=[])

connect given sound nodes to the group

Parameters:
  • audio – [] maya audio to connect to this AudioGrp
  • paths – [] if we give it raw filepaths this will import and then link up to the audioGrp
disconnectAudioNodes(audio)

disconnect the given audio nodes form the grp

Parameters:nodes – audio to connect to this AudioGrp
<<<<<<< HEAD getAudioNodes(time=(), start_inRange=True, end_inRange=True)
======= getAudioNodes(time=()) >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e

return an AudioNode object that fall within a given timerange, if not timerange is given return all linked audio

<<<<<<< HEAD ======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e
Parameters:
  • time – time (start, end) tuple as a range.
  • start_inRange – check is the testRange[0] value falls fully in the baseRange
  • end_inRange – check is the testRange[1] value falls fully in the baseRange
Parameters:time – time (start, end) tuple as a range.

Note

if you pass in baseRange as (None, 100) then we only validate against the end time. if we pass in baseRange as (10, None) we only validate against the start time else we validate that testRange is fully within the baseRanges times

isConnected(audio)
<<<<<<< HEAD
class MetaTimeCodeHUD(*args, **kws)

Bases: Red9.core.Red9_Meta.MetaHUDNode

Generate’s a HUD node connected to the main timecode attrs, allows us to show the actual internal timecode attrs as their original SMPTE time’s

Crucial things to be aware of:

We construct timecode from 3 attrs on the given node: timecode_ref : the original timecode converted to milliseconds timecode_count : a linear curve that increments every frame based on the samplerate timecode_samplerate : samplerate that the linear counter was generated against

SMPTE timecode is then reconstructed like so:

>>> r9Audio.milliseconds_to_Timecode(ref + ((count / samplerate) * 1000)) 

The easiest and expected way to use this class is directly from the Pro_MetaRig.Timecode class binding in which this HUD class is managed in a correct manner. See audio.Timecode class for more details.

>>> mrig=r9Meta.getMetaRigs()[0]
>>> mrig.Timecode.addTimecode_to_node(tc='01:00:00:00', propagate=True)  # add timecode to the mRig
>>> mrig.Timecode.hud_connect()

You can of course run this directly from a class instance, however, the nodes passed to the addMonitored call have to have the timecode attrs already bound to them

>>> tcHUD=r9pmeta.MetaTimeCodeHUD() 
>>> tcHUD.addMonitoredTimecodeNode(cmds.ls(sl=True)[0])  # node must have valid timecode attrs already
>>> tcHUD.drawHUD() 

Idea here is if a MayaNode is passed in and has the mClass attr we pass that into the super(__new__) such that an object of that class is then instantiated and returned.

refreshHud()

Refresh the HUD by killing it and re-drawing it from scratch, we also re-build the cached attrs for the timecode systems

addMonitoredTimecodeNode(nodes, valid=True)

add a node with the TimeCode attrs on it to monitor

removeMonitoredTimecodeNode(nodes)

remove a given node from the timecode

removeMonitoredAttr(attr)

remove a specific attr from the HUD

connectTimecodeSystems(*args, **kws)

connect all mRigs in the scene to the HUD node

======= >>>>>>> d7ab8a039c4da0838a07bf4a9ec3ad957667b21e